package com.tony.akka.sample4;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import com.tony.akka.StdIn;

/**
 * @version V1.0  </br>
 * @ClassName App </br>
 * @Description TODO  </br>
 * @Author tonywang</br>
 * @DATE 3/19/2019 2:36 PM</br>
 */
public class App {
    public static void main(String[] args){
        ActorSystem system = ActorSystem.create();
        ActorRef db = system.actorOf(DbSupervisor.props(), "db");
        system.actorOf(WebServer.props(db, "localhost", 8080), "webserver");

        System.out.println("ENTER to terminate");
        StdIn.readLine();
        system.terminate();
    }
}
